package com.rtx.edi.platform.quartz.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rtx.edi.platform.quartz.bean.JobEntity;

/**
 * 定时任务
 */
public interface JobService {

    /**
     * 新增任务
     * @param jobEntity
     */
    void add(JobEntity jobEntity) throws Exception;

    /**
     * 删除任务
     * @param jobEntity
     */
    void delete(JobEntity jobEntity) throws Exception;

    /**
     * 修改任务
     * @param jobEntity
     */
    void update(JobEntity jobEntity) throws Exception;

    /**
     * 执行任务
     * @param jobEntity
     */
    void execute(JobEntity jobEntity) throws Exception;

    /**
     * 暂停任务
     * @param jobEntity
     */
    void pause(JobEntity jobEntity) throws Exception;

    /**
     * 恢复任务
     * @param jobEntity
     */
    void resume(JobEntity jobEntity) throws Exception;

    /**
     * 获取定时任务
     * @param pageParam
     * @param jobEntity
     */
    void pageList(Page<JobEntity> pageParam, JobEntity jobEntity);
}
